﻿var os = require('os');
var global_var = require('./config/global_variable.js');
var datalist = {};
const totalmem = os.totalmem();
datalist['9066'] = 
               {   send:
               	     {
               	  	   name:'server_master',
	                   des:'主进程',
	                   ip:global_var.server_ip2,
	                   port:9066,
	                   totalmemory:totalmem,
	                   time: (new Date()).getTime(),
	                   cur_time:(new Date()).getTime(),
					   memory:0.00,
					   cpu:0.00,
					   mem_scale:0.00,
	                   status:'启动中'
                     },
                   db_name:null,
				   processobj:null,
				   filename:'./server_cluster.js',
				   flag:'master',
				   start:0
               };
datalist["9060"] = 
				{  
				   send:
				     { 
				     	name:'server_file_zdnet',
					    des:'网站图片上传',
					    ip:global_var.server_ip2,
					    port:9060,
					    totalmemory:totalmem,
					    time: (new Date()).getTime(),
					    cur_time:(new Date()).getTime(),
					    memory:0.00,
					    cpu:0.00,
					    mem_scale:0.00,
					    status:'未启动'
				    },
					processobj:null,
					db_name:null,
					filename:'./file/server_file.js',
					flag:'zdnet',
					start :0
				};
datalist["9061"] =
                {   send: 
                	   {
                	   	name:'server_file_android',
                        des:'虚拟服务器图片上传',
                        ip:global_var.server_ip2,
                        port:9061,
                        totalmemory:totalmem,
                        time: (new Date()).getTime(),
                        cur_time:(new Date()).getTime(),
					    memory:0.00,
					    cpu:0.00,
					    mem_scale:0.00,
                        status:'未启动'
                       },
					processobj:null,
					db_name:null,
					filename:'./file/server_file.js',
					flag:'android',
					start:1
                };
datalist['8888'] = 
                {   send:
                	  {
                	  	name:'server_instant',
                        des:'画板通讯服务器',
                        ip:global_var.server_ip2,
                        port:8888,
                        totalmemory:totalmem,
                        time: (new Date()).getTime(),
                        cur_time:(new Date()).getTime(),
					    memory:0.00,
					    cpu:0.00,
					    mem_scale:0.00,
                        status:'未启动'
                      },
					processobj:null,
					db_name:'./instant/instant.db',
					filename:'./instant/server_instant.js',
					flag:'draw',
					start :0
                };
datalist['7777'] = 
               {   send:
               	     {
               	  	   name:'server_doc',
	                   des:'接口文档管理',
	                   ip:global_var.server_ip2,
	                   port:7777,
	                   totalmemory:totalmem,
	                   time: (new Date()).getTime(),
	                   cur_time:(new Date()).getTime(),
					   memory:0.00,
					   cpu:0.00,
					   mem_scale:0.00,
	                   status:'未启动'
                     },
				   processobj:null,
				   db_name:'./doc/doc.db',
				   filename:'./doc/server_doc.js',
				   flag:'doc',
				   start:1
               };
datalist['3001'] = 
               {   send:
               	     {
               	  	   name:'server_sm',
	                   des:'短消息',
	                   ip:global_var.server_ip2,
	                   port:3001,
	                   totalmemory:totalmem,
	                   time: (new Date()).getTime(),
	                   cur_time:(new Date()).getTime(),
					   memory:0.00,
					   cpu:0.00,
					   mem_scale:0.00,
	                   status:'未启动'
                     },
				   processobj:null,
				   db_name:'./sm/sm.db',
				   filename:'./sm/server_sm.js',
				   flag:'sm',
				   start:0
               }; 
datalist['8051'] = 
               {   send:
               	     {
               	  	   name:'server_tcp',
	                   des:'tcpserver',
	                   ip:global_var.server_ip2,
	                   port:8051,
	                   totalmemory:totalmem,
	                   time: (new Date()).getTime(),
	                   cur_time:(new Date()).getTime(),
					   memory:0.00,
					   cpu:0.00,
					   mem_scale:0.00,
	                   status:'未启动'
                     },
				   processobj:null,
				   db_name:null,
				   filename:'./iotserver/tcpserver.js',
				   flag:'tcp',
				   start:1
               };  
                                                      
module.exports = datalist;         